﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Collections.Generic;
using System.Text;
using Session;

/// <summary>
/// Summary description for DynamicQuery
/// </summary>
public class DynamicQuery
{
	public DynamicQuery()
	{
       
        
	}

    //public string Query()
    //{
    //    //string Query = string.Empty;
    //    //string FinalQuery;
    //    //StringBuilder Attributes;
    //    //StringBuilder StringColumns;
    //    //StringBuilder ValidationColumns;
       
       
    //    //List<string> Tables = (List<string>) Session["CheckedItem"];
    //    //List<string> QueryColumns = (List<string>) Session["QueryColumn"];

    //    //for (int k = 0; Tables.Count > k; k++)
    //    //{
    //    //    if (Tables[k].ToString() == "Material")
    //    //    {
    //    //        Attributes.Append("material.name,material.source,material.handlingHistory");
    //    //        ValidationColumns.Append("and material.id=experiment.material_fk;");
    //    //    }

    //    //}

    //    //for (int k = 0; QueryColumns.Count > k; k++)
    //    //{
    //    //    if (QueryColumns[k].ToString() == "material.name")
    //    //    {
    //    //        StringColumns.Append("material.name='" + (string)Session["MaterialName"] + "'");
    //    //    }

    //    //}

    //    //FinalQuery = "Select experiment.experimentName," + Attributes + " " + "From experiment," + Tables[0].ToString() + "where" + " " + QueryColumns + " " + ValidationColumns;

    //    //return FinalQuery;

    //}
}
